/*
 *    
 *    Copyright (C) 2006, Network Resonance, Inc.
 *    All Rights Reserved
 *    
 *    Redistribution and use in source and binary forms, with or without
 *    modification, are permitted provided that the following conditions
 *    are met:
 *    
 *    1. Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *    2. Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *    3. Neither the name of Network Resonance, Inc. nor the name of any
 *       contributors to this software may be used to endorse or promote 
 *       products derived from this software without specific prior written
 *       permission.
 *    
 *    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
 *    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 *    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 *    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
 *    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
 *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
 *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 *    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
 *    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 *    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 *    POSSIBILITY OF SUCH DAMAGE.
 *    
 */
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include <memory.h>
#include "regrpc.h"
#undef clnt_call
#define clnt_call(a1,a2,a3,a4,a5,a6,a7) CLNT_CALL((a1),(a2),(void*)(a3),(caddr_t)(a4),(void*)(a5),(caddr_t)(a6),(a7))

/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };

nr_regd_result_char *
nr_reg_get_char_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_char clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_CHAR, xdr_nr_regd_registry, &name, xdr_nr_regd_result_char, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UCHAR *
nr_reg_get_uchar_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_UCHAR clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_UCHAR, xdr_nr_regd_registry, &name, xdr_nr_regd_result_UCHAR, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_INT2 *
nr_reg_get_int2_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_INT2 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_INT2, xdr_nr_regd_registry, &name, xdr_nr_regd_result_INT2, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UINT2 *
nr_reg_get_uint2_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_UINT2 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_UINT2, xdr_nr_regd_registry, &name, xdr_nr_regd_result_UINT2, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_INT4 *
nr_reg_get_int4_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_INT4 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_INT4, xdr_nr_regd_registry, &name, xdr_nr_regd_result_INT4, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UINT4 *
nr_reg_get_uint4_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_UINT4 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_UINT4, xdr_nr_regd_registry, &name, xdr_nr_regd_result_UINT4, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_INT8 *
nr_reg_get_int8_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_INT8 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_INT8, xdr_nr_regd_registry, &name, xdr_nr_regd_result_INT8, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UINT8 *
nr_reg_get_uint8_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_UINT8 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_UINT8, xdr_nr_regd_registry, &name, xdr_nr_regd_result_UINT8, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_double *
nr_reg_get_double_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_double clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_DOUBLE, xdr_nr_regd_registry, &name, xdr_nr_regd_result_double, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_string *
nr_reg_get_registry_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_string clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_REGISTRY, xdr_nr_regd_registry, &name, xdr_nr_regd_result_string, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_bytes *
nr_reg_get_bytes_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_bytes clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_BYTES, xdr_nr_regd_registry, &name, xdr_nr_regd_result_bytes, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_string *
nr_reg_get_string_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_string clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_STRING, xdr_nr_regd_registry, &name, xdr_nr_regd_result_string, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UINT4 *
nr_reg_get_length_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_UINT4 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_LENGTH, xdr_nr_regd_registry, &name, xdr_nr_regd_result_UINT4, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_string *
nr_reg_get_type_1(nr_regd_registry name,  CLIENT *clnt)
{
	static nr_regd_result_string clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_TYPE, xdr_nr_regd_registry, &name, xdr_nr_regd_result_string, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_char_1(nr_regd_registry name, char data,  CLIENT *clnt)
{
	nr_reg_set_char_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_CHAR, xdr_nr_reg_set_char_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_uchar_1(nr_regd_registry name, u_char data,  CLIENT *clnt)
{
	nr_reg_set_uchar_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_UCHAR, xdr_nr_reg_set_uchar_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_int2_1(nr_regd_registry name, int16_t data,  CLIENT *clnt)
{
	nr_reg_set_int2_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_INT2, xdr_nr_reg_set_int2_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_uint2_1(nr_regd_registry name, u_int16_t data,  CLIENT *clnt)
{
	nr_reg_set_uint2_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_UINT2, xdr_nr_reg_set_uint2_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_int4_1(nr_regd_registry name, int32_t data,  CLIENT *clnt)
{
	nr_reg_set_int4_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_INT4, xdr_nr_reg_set_int4_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_uint4_1(nr_regd_registry name, u_int32_t data,  CLIENT *clnt)
{
	nr_reg_set_uint4_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_UINT4, xdr_nr_reg_set_uint4_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_int8_1(nr_regd_registry name, int64_t data,  CLIENT *clnt)
{
	nr_reg_set_int8_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_INT8, xdr_nr_reg_set_int8_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_uint8_1(nr_regd_registry name, u_int64_t data,  CLIENT *clnt)
{
	nr_reg_set_uint8_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_UINT8, xdr_nr_reg_set_uint8_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_double_1(nr_regd_registry name, double data,  CLIENT *clnt)
{
	nr_reg_set_double_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_DOUBLE, xdr_nr_reg_set_double_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_registry_1(nr_regd_registry name,  CLIENT *clnt)
{
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_SET_REGISTRY, xdr_nr_regd_registry, &name, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_bytes_1(nr_regd_registry name, nr_regd_data data,  CLIENT *clnt)
{
	nr_reg_set_bytes_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_BYTES, xdr_nr_reg_set_bytes_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_set_string_1(nr_regd_registry name, nr_regd_string data,  CLIENT *clnt)
{
	nr_reg_set_string_1_argument arg;
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	arg.name = name;
	arg.data = data;
	if (clnt_call(clnt, NR_REG_SET_STRING, xdr_nr_reg_set_string_1_argument, &arg, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_del_1(nr_regd_registry name,  CLIENT *clnt)
{
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_DEL, xdr_nr_regd_registry, &name, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_fin_1(nr_regd_registry name,  CLIENT *clnt)
{
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_FIN, xdr_nr_regd_registry, &name, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_UINT4 *
nr_reg_get_child_count_1(nr_regd_registry parent,  CLIENT *clnt)
{
	static nr_regd_result_UINT4 clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_CHILD_COUNT, xdr_nr_regd_registry, &parent, xdr_nr_regd_result_UINT4, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

nr_regd_result_strings *
nr_reg_get_children_1(nr_regd_registry parent,  CLIENT *clnt)
{
	static nr_regd_result_strings clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_GET_CHILDREN, xdr_nr_regd_registry, &parent, xdr_nr_regd_result_strings, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_dump_1(CLIENT *clnt)
{
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_DUMP, xdr_void, NULL, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}

int *
nr_reg_register_for_callbacks_1(int port,  CLIENT *clnt)
{
	static int clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call(clnt, NR_REG_REGISTER_FOR_CALLBACKS, xdr_int, &port, xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS)
		return (NULL);
	return (&clnt_res);
}
